﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class ShowParticleSystem : MonoBehaviour {

    public ParticleSystem part;
    public float startSize = 0.1f;
    public float velocityPower = 10f;
    void Start()
    {

    }

    void Update()
    {

        part.Emit(new ParticleSystem.EmitParams()
        {
            position = new Vector3(0, 1.0f, 0),
            velocity = new Vector3(UnityEngine.Random.Range(-velocityPower, velocityPower), 
            UnityEngine.Random.Range(-velocityPower, velocityPower), 
            UnityEngine.Random.Range(-velocityPower, velocityPower)),

            startSize = this.startSize,
            startLifetime = 5,
            startColor = new Color32((byte)UnityEngine.Random.Range(0, 255), (byte)UnityEngine.Random.Range(0, 255), (byte)UnityEngine.Random.Range(0, 255), 255)
        }, 1);
    }



}
